import * as path from "path";
import { MailerOptions} from "@nestjs-modules/mailer";
import { EjsAdapter } from "@nestjs-modules/mailer/dist/adapters/ejs.adapter";

/**
 * 邮箱模块配置文件
 */
const Mail: MailerOptions = {
    transport: {
        host: 'smtp.qq.com', //邮箱服务器地址
        port: 465, //服务器端口 默认 465
        auth: {
            user: '757986850@qq.com',//你的邮箱地址
            pass: 'yemwctyfjsqrbdbd'
        }
    },
    preview: false, // 是否开启预览
    defaults: {
        from: 'Haor<757986850@qq.com>' //发送人 你的邮箱地址
    },
    template: {
        dir: path.join(process.cwd(), '/templates/'),
        adapter: new EjsAdapter(),
        options: {
            strict: true
        }
    }
}

export { Mail }
